<?php

////场景：硬件设备交互、消息通讯
$client = new Swoole\Client(SWOOLE_SOCK_UDP,SWOOLE_SOCK_SYNC);

$client->sendto('192.168.99.100', 9501, 'udp数据包');

//应答机制ack
echo $client->recv() . PHP_EOL;